#ifndef SC_INTERFACE_H_INCLUDED
#define SC_INTERFACE_H_INCLUDED

#include "singleton.hpp"
#include "wx/wx.h"
#include <map>

namespace sc {

namespace error {

enum eCode {
    NONE,
    RNG_NOT_LOADED,
    SHEMA_INVALID,
    XPATH_CTX_INVALID,
    XPATH_INVALID_EXPRESSION,
    XPATH_NO_RESULT,
	CHILD_INVALID,
	ELEMENT_DOESNT_EXIST,
	CANT_SAVE_FILE,
	CANT_OPEN_FILE,
	SCC_NOT_LOADED,
	CONTEXT_DONT_HAVE_SETUP,
	XSL_CANT_TRANSFORM,
    UNKNOWN
};

class Error : public Singleton<Error>
{
	friend class Singleton<Error>;
private:
	std::map<int, wxString> m_mapError;
	
protected :
	Error();
	
	void Init();

public:
	wxString GetString(int e) const;

};

inline
wxString str(int e)
{
	return Error::get()->GetString(e);
}

}; // namespace error

}; // namespace gc

#endif // SC_INTERFACE_H_INCLUDED
